package com.demo2do.sms.entity.sms;

import java.util.Date;

import com.demo2do.core.persistence.annotation.ColumnMapping;
import com.demo2do.core.persistence.annotation.QueryTarget;

/**
 * 
 * @author mohanlan
 *
 */
@QueryTarget(table = "sms_record")
public class SmsRecord {
    
    private Long id;
    
    /** sms company alias */
    private String client;
    
    /** receiver's mobile */
    private String mobile;
    
    /** message content */
    private String content;
    
    /** message record createTime */
    @ColumnMapping(name = "create_time")
    private Date createTime;
    
    /** message sendTime */
    @ColumnMapping(name = "send_time")
    private Date sendTime;
    
    /** message delay send seconds*/
    @ColumnMapping(name = "delay_seconds")
    private int delaySeconds;
    
    private String result;
    
    /**
     * The default constructor
     */
    public SmsRecord() {
        
    }

    /**
     * 
     * @param mobile
     * @param content
     * @param client
     */
    public SmsRecord(String mobile, String content, String client) {
        this.client = client;
        this.mobile = mobile;
        this.content = content;
    }

    /**
     * 
     * @return
     */
    public SmsRecord initialize() {
        this.createTime = new Date();
        return this;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the client
     */
    public String getClient() {
        return client;
    }

    /**
     * @return the mobile
     */
    public String getMobile() {
        return mobile;
    }

    /**
     * @return the content
     */
    public String getContent() {
        return content;
    }

    /**
     * @return the createTime
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @return the sendTime
     */
    public Date getSendTime() {
        return sendTime;
    }

    /**
     * @return the delaySeconds
     */
    public int getDelaySeconds() {
        return delaySeconds;
    }

    /**
     * @return the result
     */
    public String getResult() {
        return result;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param client the client to set
     */
    public void setClient(String client) {
        this.client = client;
    }

    /**
     * @param mobile the mobile to set
     */
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    /**
     * @param content the content to set
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * @param createTime the createTime to set
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * @param sendTime the sendTime to set
     */
    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    /**
     * @param delaySeconds the delaySeconds to set
     */
    public void setDelaySeconds(int delaySeconds) {
        this.delaySeconds = delaySeconds;
    }

    /**
     * @param result the result to set
     */
    public void setResult(String result) {
        this.result = result;
    }
}
